package com.secsbrain.development.web.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 发布相关参数
 *
 * @author zhaoyi
 */
@ApiModel(value = "构建模型")
public class DeployDTO {

	@ApiModelProperty(value = "操作标识：0-新增，1-修改",required = true)
	private Integer flag;

	@ApiModelProperty(value = "环境名称",required = true)
	private String envName;

	@ApiModelProperty(value = "应用ID",required = true)
	private Long appId;//应用ID
	
	//根据应用类型选填
	@ApiModelProperty(value = "jar文件目标路径")
	private String targetPath;//目标路径，如/engine-service/target/engine-service.jar
	
	private String remoteFloder;//接收文件的远程文件夹，如/opt/jar/engine
	
	private String remoteCmdPath;//远程启动命令路径，如/opt/sh/engine/deploy.sh
	
	private String buildCmd;//如build:sit
	
	private boolean switchflow=false;//是否切流发布
	
	private String sfEnv;//切流发布环境名称

	@ApiModelProperty(value = "是否是k8s环境，默认是")
	private boolean k8s=true;
	
	//spring boot选填参数
	private String eurekaUrl;//eureka地址，如http://10.0.11.79:8762
	
	private Integer port;//端口号，如8080
	
	private String applicationName;//spring应用名，如service-engine
	
	private Integer waitTime;//下线后等待时间（秒）

	@ApiModelProperty(value = "启动参数（-jar之前）")
	private String jvmOption;

	@ApiModelProperty(value = "启动参数（-jar之后）")
	private String javaOption;
	
	public Long getAppId() {
		return appId;
	}

	public void setAppId(Long appId) {
		this.appId = appId;
	}

	public String getTargetPath() {
		return targetPath;
	}

	public void setTargetPath(String targetPath) {
		this.targetPath = targetPath;
	}

	public String getRemoteFloder() {
		return remoteFloder;
	}

	public void setRemoteFloder(String remoteFloder) {
		this.remoteFloder = remoteFloder;
	}

	public String getRemoteCmdPath() {
		return remoteCmdPath;
	}

	public void setRemoteCmdPath(String remoteCmdPath) {
		this.remoteCmdPath = remoteCmdPath;
	}

	public String getBuildCmd() {
		return buildCmd;
	}

	public void setBuildCmd(String buildCmd) {
		this.buildCmd = buildCmd;
	}

	public Integer getFlag() {
		return flag;
	}

	public void setFlag(Integer flag) {
		this.flag = flag;
	}

	public boolean isSwitchflow() {
		return switchflow;
	}

	public void setSwitchflow(boolean switchflow) {
		this.switchflow = switchflow;
	}

	public String getSfEnv() {
		return sfEnv;
	}

	public void setSfEnv(String sfEnv) {
		this.sfEnv = sfEnv;
	}

	public Integer getPort() {
		return port;
	}

	public void setPort(Integer port) {
		this.port = port;
	}

	public String getApplicationName() {
		return applicationName;
	}

	public void setApplicationName(String applicationName) {
		this.applicationName = applicationName;
	}

	public Integer getWaitTime() {
		return waitTime;
	}

	public void setWaitTime(Integer waitTime) {
		this.waitTime = waitTime;
	}

	public String getEurekaUrl() {
		return eurekaUrl;
	}

	public void setEurekaUrl(String eurekaUrl) {
		this.eurekaUrl = eurekaUrl;
	}

	public String getJavaOption() {
		return javaOption;
	}

	public void setJavaOption(String javaOption) {
		this.javaOption = javaOption;
	}

	public boolean isK8s() {
		return k8s;
	}

	public void setK8s(boolean k8s) {
		this.k8s = k8s;
	}

	public String getEnvName() {
		return envName;
	}

	public void setEnvName(String envName) {
		this.envName = envName;
	}

	public String getJvmOption() {
		return jvmOption;
	}

	public void setJvmOption(String jvmOption) {
		this.jvmOption = jvmOption;
	}
}
